package com.example.weixinauth.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


import java.security.KeyPair;
import java.util.Map;

@RestController
@RequiredArgsConstructor
public class KeyPairController {

    private KeyPair keyPair;

    @GetMapping("/rsa/publicKey")
    public Map<String, Object> getKey() {
        // RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();
        // RSAKey key = new RSAKey.Builder(publicKey).build();
        // return new JWKSet(key).toJSONObject();
        return null;
    }

}
